package com.baizhi.enumeration02;

/**
 * 季节，枚举
 */
public enum Season {
    //需要有四个继承了季节的类表示春夏秋冬四个季节，
    //枚举类型中，不需要new对象，只需要列举出类名即可
//    public static final Season 春季 = new Spring();
//    public static final Season 夏季 = new Summer();
//    public  static final 秋季  = new Autumn();
//    public  static final  冬季 = new Winter();

    SPRING("春天","暖和"),
    SUMMER("夏天","炎热"),
    AUTUMN("秋天","凉爽"),
    WINTER("冬天","寒冷");

    //季节名称和特征
    private String name;
    private String desc;


    Season() {
    }

    Season(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
